{% extends "web/vipbase.html" %}

{% block rightcontent %}
    <form id="edit-profile" action="{% url 'vip_update' %}" class="form-horizontal" method="post">
        {% csrf_token %}
        <fieldset>
            <legend style="padding-top:8px;">编辑个人信息</legend>
            <div class="form-group">
                <label class="col-lg-2 control-label" for="input01">账号：</label>
                <div class="col-lg-6">
                    {{ user.username }}
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg-2 control-label" for="input02">真实姓名：</label>
                <div class="col-lg-6">
                    <input type="text" name="name" class="form-control" id="input02" value="{{ user.name }}" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg-2 control-label" for="input03">性别：</label>
                <div class="col-lg-6">
                    <label class="radio-inline">
                        <input type="radio" name="sex" id="input03" value="1"
                                                               {% if user.sex == 1 %}checked{% endif %} /> 男
                    </label>
                    <label class="radio-inline">
                    <input type="radio" name="sex" id="input031" value="0"
                    {% if user.sex == 0 %}checked{% endif %} /> 女
                    </label>
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg-2 control-label" for="input04">地址：</label>
                <div class="col-lg-6">
                    <input type="text" name="address" class="form-control" id="input04" value="{{ user.address }}" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg-2 control-label" for="input05">邮编：</label>
                <div class="col-lg-6">
                    <input type="text" name="code" class="form-control" id="input05" value="{{ user.code }}" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg-2 control-label" for="input06">电话：</label>
                <div class="col-lg-6">
                    <input type="text" name="phone" class="form-control" id="input06" value="{{ user.phone }}" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg-2 control-label" for="input07">email邮箱：</label>
                <div class="col-lg-6">
                    <input type="text" name="email" class="form-control" id="input07" value="{{ user.email }}" />
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-primary">保存</button> <button type="reset" class="btn">重置</button>
                </div>
            </div>
        </fieldset>
    </form>
{% endblock %}